import { defineStore } from "pinia"

export const useUserStore = defineStore('user', () => {
  const someState = ref('hello pinia')

  // 更新someState
  function updateSomeState() {
    someState.value = 'hello pinia 2'
  }
  

  return { someState , updateSomeState }
}, {
  persist: {
    key:'my-user',
    pick: ['someState'],
  },
})
